<template>
  <footer class="app-footer">
    <div class="footer-container">
      <div class="footer-content">
        <div class="footer-section">
          <h3>简单工具集</h3>
          <p>提供各种实用的在线工具，提高您的工作效率</p>
        </div>
        <div class="footer-section">
          <h3>快速链接</h3>
          <ul class="footer-links">
            <li><router-link to="/">首页</router-link></li>
            <li><router-link to="/tools">工具</router-link></li>
            <li><router-link to="/about">关于我们</router-link></li>
          </ul>
        </div>
        <div class="footer-section">
          <h3>热门工具</h3>
          <ul class="footer-links">
            <li><router-link to="/tool/1">文本格式化</router-link></li>
            <li><router-link to="/tool/3">图片压缩</router-link></li>
            <li><router-link to="/tool/5">单位换算</router-link></li>
          </ul>
        </div>
        <div class="footer-section">
          <h3>联系我们</h3>
          <p><el-icon><Message /></el-icon> contact@simpletools.com</p>
          <div class="social-links">
            <a href="#" title="微信"><el-icon><ChatDotRound /></el-icon></a>
            <a href="#" title="微博"><el-icon><Share /></el-icon></a>
            <a href="#" title="GitHub"><el-icon><Link /></el-icon></a>
          </div>
        </div>
      </div>
      <div class="footer-bottom">
        <p>&copy; {{ currentYear }} 简单工具集 | 版权所有</p>
      </div>
    </div>
  </footer>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { Message, ChatDotRound, Share, Link } from '@element-plus/icons-vue'

const currentYear = computed(() => new Date().getFullYear())
</script>

<style scoped>
.app-footer {
  background-color: #f5f7fa;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
  padding-right: 20px;
}

.footer-section h3 {
  font-size: 1.2rem;
  color: #303133;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: #409eff;
}

.footer-section p {
  color: #606266;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #606266;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #409eff;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e4e7ed;
  color: #606266;
  transition: all 0.3s;
}

.social-links a:hover {
  background-color: #409eff;
  color: white;
}

.footer-bottom {
  border-top: 1px solid #dcdfe6;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  color: #909399;
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }
  
  .footer-section {
    width: 100%;
    padding-right: 0;
  }
}
</style> 